home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / INTERNET / SITES / GRAHAM / XA_6S.ZIP / SOURCE / CLIENT.C < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-24  |  590 b   |  39 lines

  1. /*
  2.  * XaAES - XaAES Ain't the AES
  3.  *
  4.  * A multitasking AES replacement for MiNT
  5.  *
  6.  */
  7.  
  8. #include "XA_DEFS.H"
  9. #include "XA_TYPES.H"
  10. #include "XA_GLOBL.H"
  11.  
  12. /*
  13.     Client list handling
  14. */
  15.  
  16. #if DYNAMIC_CLIENT_STRUCTURE
  17.  
  18. #else
  19. XA_CLIENT *FirstClient(void)
  20. {
  21.     XA_CLIENT *this;
  22.  
  23.     this=&clients[0]; 
  24.     if (!this->clnt_pipe_rd)
  25.         this=NextClient(this);
  26.     return this;
  27. }
  28.  
  29. XA_CLIENT *NextClient(XA_CLIENT *this)
  30. {
  31.     do {
  32.         this=(((XA_CLIENT*)(this)<&clients[MAX_PID-1]) ? (XA_CLIENT*)(this)+1 : NULL);
  33.     } while((this)&&(!this->clnt_pipe_rd));
  34.     
  35.     return this;
  36. }
  37.  
  38. #endif
  39.